<template>
  <el-card>
    <template #header>
      <div>useBoolean</div>
    </template>
    <el-descriptions>
      <el-descriptions-item label="源码地址">
        https://github.com/InhiblabCore/vue-hooks-plus/blob/master/packages/hooks/src/useBoolean/index.ts
      </el-descriptions-item>
    </el-descriptions>
    <div>{{ flag }}</div>
    <br />
    <div>
      <p>
        <el-button @click="() => set(!flag)">Set</el-button>
        <el-button style="margin-left: 8px" @click="() => setTrue()">
          SetTrue
        </el-button>
        <el-button style="margin-left: 8px" @click="() => setFalse()">
          SetFalse
        </el-button>
      </p>
    </div>
  </el-card>
</template>

<script setup>
  import { useBoolean } from "vue-hooks-plus";
  const [flag, { set, setFalse, setTrue }] = useBoolean(true);
</script>
